import {mapActions, mapGetters} from 'vuex';
//import api from 'api';

export default {
  data () {
    return {
      lang: this.$i18n.locale, // 当前语言
      menuList: [{
        "menuId": "class_1",
        "menuNameCn":"人员信息",
        "menuNameEn":"人员信息",
        "iconCls": "el-icon-location",
        "children":[{
          "menuId": "class_2",
          "menuNameCn":"学生列表",
        
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"studentList",
          "url":"/studentList"
        },
        {
          "menuId": "class_3",
          "menuNameCn":"教师列表",
        
          "iconCls": "el-icon-location",
          "children":[],
          "comp":"teacherList",
          "url":"/teacherList"
        }
      ],
        "comp":"",
        "url":""
      },{
        "menuId": "class_4",
        "menuNameCn":"作业历史记录",
       
        "iconCls": "el-icon-location",
        "children":[],
        "comp":"history",
        "url":"/history"
      }
      ,{
        "menuId": "class_5",
        "menuNameCn":"课程列表",
       
        "iconCls": "el-icon-location",
        "children":[],
        "comp":"courseList",
        "url":"/courseList"
      }
      ], // 菜单集合
      showMenuFlag: true, // 是否展示菜单
      isCollapse: false // 是否折叠菜单

    };
  },

  methods: {
    ...mapActions([ // https://vuex.vuejs.org/zh-cn/actions.html
      'userAddTab',
      'userRemoveTab',
      'userClickTab'
    ])
  },
  computed: {
    ...mapGetters([ // https://vuex.vuejs.org/zh-cn/getters.html
      'getUserHomeCurrentTab',
      'getUserHomeTabs'
    ]),
    currentMenu () {
      return this.$store.state.userCenter.homeCurrentTab;
    }
  },
  components: {
    history: () => import('views/comp/homeworkhistory.vue'),
    courseList: () => import('views/ClassManage/course/courseList.vue'),
    teacherList: () => import('views/ClassManage/personinfo/teacherList.vue'),
    studentList: () => import('views/ClassManage/personinfo/studentList.vue'),
  }
};
